/*
 * $Id$
 *
 * Copyright (C) Paris8-IUT de Montreuil, 2012-2013
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

package fr.paris8.iut.info.iddl.localnode;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import com.clarkparsia.pellet.owlapiv3.PelletReasoner;
import fr.paris8.iut.info.iddl.IDDLReasoner;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.reasoner.BufferingMode;
import org.semanticweb.owlapi.reasoner.IllegalConfigurationException;
import org.semanticweb.owlapi.reasoner.OWLReasoner;
import org.semanticweb.owlapi.reasoner.OWLReasonerConfiguration;
import org.semanticweb.owlapi.reasoner.OWLReasonerFactory;

/**
 *
 * @author MYAMBITION
 */
public class LocalReasonerFactory implements OWLReasonerFactory {
    

    public String getReasonerName() {
        return "IDDL reasoner";
    }

    public OWLReasoner createNonBufferingReasoner(OWLOntology owlo) {
        PelletReasoner reasoner = new PelletReasoner(owlo, BufferingMode.NON_BUFFERING);
        //IDDLReasoner reasoner = new IDDLReasoner();
        //reasoner.localReasoner.loadOntology(owlo);
        return reasoner;
    }

    public OWLReasoner createReasoner(OWLOntology owlo) {
        //IDDLReasoner reasoner = new IDDLReasoner();
        //reasoner.localReasoner.loadOntology(owlo);
         PelletReasoner reasoner = new PelletReasoner(owlo, BufferingMode.BUFFERING);
        return reasoner;
    }

    public OWLReasoner createNonBufferingReasoner(OWLOntology owlo, OWLReasonerConfiguration owlrc) throws IllegalConfigurationException {
        PelletReasoner reasoner = new PelletReasoner(owlo, BufferingMode.NON_BUFFERING);
        return reasoner;
    }

    public OWLReasoner createReasoner(OWLOntology owlo, OWLReasonerConfiguration owlrc) throws IllegalConfigurationException {
        PelletReasoner reasoner = new PelletReasoner(owlo, BufferingMode.NON_BUFFERING);
        return reasoner;
    }

}
